package com.yc.login.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

@Data
@ConfigurationProperties(prefix = "login")
public class LoginProperties {
    String userClass;
    String userTable;
    String usernameColumn;
    String passwordColumn;
    String emailColumn;
    String encryption;
    String sessionKey;
    String[] loginScope;

    Class userClassObject;

    @PostConstruct
    void myInit() throws ClassNotFoundException {
        System.out.println(getUserClass());
        userClassObject=Class.forName(getUserClass());
    }
}
